﻿CREATE PROCEDURE [ServiceEngine].[ListPolicyAssertionsByPolicy]
	@PolicyID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as PolicyAssertionID, N.[EntityName] as [Name], N.EntityDescription as Description
	FROM	[ServiceEngine].Names N
	INNER JOIN [ServiceEngine].Policies_PolicyAssertions P on N.EntityID = P.PolicyAssertionID	
	WHERE	N.[EntityTypeID] = 19 AND P.PolicyID = @PolicyID
	Order by P.AssertionOrder Asc
END
